## Sound Functions -- Summary

(1) First, declare the following.

`#include "`Sound file directory`/m4aLib.h"`
(2) After resetting, run the following using the initialization routines.
Initialize the sound function I/O and set aside the work areas.

`m4aSoundInit( );`
(3) Immediately after every V-Blank interrupt, call the following function.
The timing here is critical, so it is ideal for these to be called before any other process.
Note that the process itself is extremely short.

`m4aSoundVSync( );`
(4) Call the following function every 1/60 of a second during the V-Sync period.
There is no need to worry about the timing here. They can be called after all of the other non-musical processes have finished.

`m4aSoundMain( );`
(5) To start playing song number n, please call the following function.

`m4aSongNumStart( n );`
(6) The above will cause a sound to play.
For more information, please refer to the Detailed Descriptions described in a later section.

Next:[ Music Players ] Back:[ Incorporating Sound Objects into Games ] TOP :[ Table of Contents ]